import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/sys/role/save',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: '/sys/role/delete',
    method: 'post',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: '/sys/role/update',
    method: 'post',
    data
  })
}

export function get(data) {
  return request({
    url: `/sys/role/info/${data}`,
    method: 'get'
  })
}

export function getRoleList() {
  return request({
    url: '/sys/role/list',
    method: 'get'
  })
}

export default { add, edit, del, get, getRoleList }

